package com.livegoods.controller;

import com.livegoods.pojo.LivegoodsResult;
import com.livegoods.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping("/sendyzm")
    public LivegoodsResult sendyzm(String phone){

       return loginService.sendyzm(phone);
    }

    @PostMapping("/login")
    public LivegoodsResult login(String username, String password, HttpServletRequest request){

        return loginService.login(username,password,request);


    }

}
